﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;

namespace HttpAuth.Configuration
{
    public class HttpAuthCredentials : ConfigurationElement
    {
        [ConfigurationProperty("source", DefaultValue="Inline", IsRequired = false)]
        public HttpAuthCredentialSource Source { get { return (HttpAuthCredentialSource)this["source"]; } }

        [ConfigurationProperty("passwordFormat", IsRequired = false)]
        public string PasswordFormat { get { return this["passwordFormat"].ToString(); } }

        [ConfigurationProperty("", IsDefaultCollection=true,Options= ConfigurationPropertyOptions.IsDefaultCollection)]
        public HttpAuthUserCollection Users { get { return (HttpAuthUserCollection)this[new ConfigurationProperty(null,typeof(HttpAuthUserCollection),null, ConfigurationPropertyOptions.IsDefaultCollection)]; } }
    }
}
